/**
 * 
 */
package com.csair.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import com.csair.uplatform.dto.UserDTO;

/**
 * @author ppt
 *
 */
@Service("genericDao4Jdbc")
public class GenericDao4Jdbc {

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public UserDTO getUserByIdOnJdbcTemplate(int id) {
		String sql = "select * from user";
		List<UserDTO> list = jdbcTemplate.queryForList(sql, UserDTO.class);
		return list.get(0);
	}
}
